﻿using System;

namespace Main.Forms
{
    public partial class AccessDenied : DevExpress.XtraEditors.XtraForm
    {
        private int Time = 30;
        public AccessDenied()
        {
            InitializeComponent();
            timer1.Start();
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            if (Time == 1)
                this.Close();
            else
            {
                Time--;
                label1.Text = "This window will automatically close at " + Time.ToString() + " seconds";
            }
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}